Skip to content

Added note for Global Ajax Event Handlers #797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

AurelioDeRosa
Copy link
Member

Fixes gh-479

@@ -67,6 +67,9 @@
<xsl:when test="@id = 'detach-shorthand'">
As the <code>.<xsl:value-of select="@data-event"/>()</code> method is just a shorthand for <code>.on( "<xsl:value-of select="@data-event"/>", handler )</code>, detaching is possible using <code>.off( "<xsl:value-of select="@data-event"/>" )</code>.
</xsl:when>
<xsl:when test="@id = 'global-ajax-event'">
Starting with jQuery 1.9, all the handlers for the <a href="/category/ajax/global-ajax-event-handlers/">jQuery global Ajax events</a>, including those added with the <code><xsl:value-of select="@data-title"/></code> method, must be attached to <code>document</code>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it 1.9 or 1.8? Descriptions currently say 1.8.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 1.8 you should, in 1.9 you must. Is that clear enough?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. I think what you have is fine then. We typically use "As of jQuery x.x" instead of "Starting with x.x." Would you mind changing that phrase?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated based on your suggestion :)

@kswedberg
Copy link
Member

Thanks @AurelioDeRosa. Are you going to also remove the notes that currently appear in the <longdesc>? (for example, "As of jQuery 1.8, the .ajaxStop() method should only be attached to document.")

@AurelioDeRosa
Copy link
Member Author

I think your comment is related to #798. Can you check that issue I raised?

@kswedberg
Copy link
Member

Yeah, that's what I saw. What I'm suggesting is, if you're adding the "global" note to each method, you should also remove the "local" note.

@AurelioDeRosa
Copy link
Member Author

In this case, should I highlight that from 1.8 is recommended, but from 1.9 is mandatory?

@kswedberg
Copy link
Member

Never mind. I (finally) see what you're getting at. Maybe just change the global note from "must" to "must" (using <em></em>).

If you do that, then it LGTM, so feel free to merge it..

@AurelioDeRosa
Copy link
Member Author

@kswedberg updated based on your comment :)

@kswedberg
Copy link
Member

Excellent. Thanks, @AurelioDeRosa ! Wanna merge it in?

@AurelioDeRosa
Copy link
Member Author

@kswedberg Done!

@AurelioDeRosa AurelioDeRosa deleted the global-ajax branch August 20, 2015 22:33
@kswedberg
Copy link
Member

Thanks, @AurelioDeRosa !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants